/**
 * 添加JS
 * @returns
 */
layui.use(['jquery','layer','table','form'],function(){
    var $ = layui.$,
        layer = layui.layer,
        form = layui.form,
        table = layui.table;
    
 
    //监听提交
    form.on('submit(blogrollAdd)', function(data){
	    	$.post("/systemsetup/basicsetup/blogroll/addBlogroll",data.field,function(result){
	    		if (result.status == 200) {
	    			layer.msg(result.msg);
	    			var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
	    			parent.layer.close(index); //再执行关闭  
				} else {
					layer.msg(result.msg);
				}
	    	});
	    	return false;
    });
    
});